#unix commands
Explore tagged Tumblr posts
pallavinovel · 3 months ago
Text
Basic Unix Commands Everyone Must Know
0 notes
redactedconcepts · 1 year ago
Text
Shell
Manpage
Most of Unix systems are managed by using Shell. Just as you need to know a minimum number of words to have a discussion in a language, you need to know a minimum number of commands to be able to easily interact with a system. Unix systems all have, sometimes with slight differences, the same set of commands. While it is not too hard to remember commands, it might be hard to remember all of their options and how exactly to use them. The solution to this is the man command. Let’s go through a part of the ssh one, as there are few elements to know to be able to read a man page:
NAME ssh — OpenSSH SSH client (remote login program) SYNOPSIS ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file] [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-Q cipher | cipher-auth | mac | kex | key] [-R [bind_address:]port:host:hostport] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]] [user@]hostname [command] DESCRIPTION ssh (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to replace rlogin and rsh, and provide secure encrypted communications between two untrusted hosts over an insecure network. X11 connections and arbitrary TCP ports can also be forwarded over the secure channel.
Some tips:
The NAME will summarize what the command is doing. As it is usually super short, you might want to look at DESCRIPTION (bellow) if ever it does not gives clear enough information
The SYNOPSIS will help you to understand the structure of the command:
A shell command usually have this format: command options parameters
Options inside [] are optional
The string without [] are mandatory
ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-D [bind_address:]port]
ssh is mandatory
-1246AaCfgKkMNnqsTtVvXxYy is optional
-D [bind_address:]port is optional (with bind_address: being itself optional within -D [bind_address:]port
Commands
Here is the (non-exhaustive) list of commands & concepts you should master to be verbose with Unix systems:
awk # pattern scanning and processing language basename # strip directory and suffix from filenames bg # resumes suspended jobs without bringing them to the foreground cat # print files cd # change the shell working directory. chmod # change file mode chown # change file owner and group crontab # maintain crontab files curl # transfer a URL cut # remove sections from each line of files date # display or set date and time dig # DNS lookup utility df # report file system disk space usage diff # compare files line by line du # estimate file space usage echo # display a line of text find # search for files in a directory hierarchy fg # resumes suspended jobs and bring them to the foreground grep # print lines matching a pattern kill # send a signal to a process less # read file with pagination ln # create links ls # list directory contents lsb_release # print distribution-specific information lsof # list open files mkdir # create mv # move files nc # arbitrary TCP and UDP connections and listens netstat # print network connections, routing tables, interface statistics... nice # execute a utility with an altered scheduling priority nproc # print the number of processing units available passwd # change user password pgrep # look up processes based on name and other attributes pkill # send signal to processes based on name and other attributes printenv # print all or part of environment pwd # print name of current/working directory top # display Linux processes tr # translate or delete characters ps # report a snapshot of the current processes rm # remove files or directories rmdir # remove directories rsync # remote file copy scp # secure copy (remote file copy program) sed # stream editor for filtering and transforming text sleep # suspend execution for an interval of time sort # sort lines of text file ssh # OpenSSH SSH client (remote login program) ssh-keygen # SSH key generation, management and conversion su # substitute user identity sudo # execute a command as another user tail # output the last part of files tar # manipulate archives files tr # translate or delete characters uname # Print operating system name uniq # report or omit repeated lines uptime # show how long system has been running w # Show who is logged on and what they are doing whereis # locate the binary, source, and manual page files for a command which # locate a command wc # print newline, word, and byte counts for each file xargs # build and execute command lines from standard input | # redirect standard output to another command > # redirect standard output < # redirect standard input & # send process to background
Shortcuts
Some handy shortcuts:
CTRL+A # go to beginning of line CTRL+B # moves backward one character CTRL+C # stops the current command CTRL+D # deletes one character backward or logs out of current session CTRL+E # go to end of line CTRL+F # moves forward one character CTRL+G # aborts the current editing command and ring the terminal bell CTRL+K # deletes (kill) forward to end of line CTRL+L # clears screen and redisplay the line CTRL+N # next line in command history CTRL+R # searches in your command history CTRL+T # transposes two characters CTRL+U # kills backward to the beginning of line CTRL+W # kills the word behind the cursor CTRL+Y # retrieves last deleted string CTRL+Z # stops the current command, resume with fg in the foreground or bg in the background
0 notes
nixcraft · 9 months ago
Text
Linux / UNIX: DNS Lookup Command
You don't need to use third-party apps or websites to find DNS information. All you need is the command line, and you can get all the information required to report or debug problems. DNS plays a critical role in modern apps and infrastructure; hence, all developers and sysadmins must know how to use these commands to resolve issues faster.
29 notes · View notes
simple-logic · 8 months ago
Text
Tumblr media
Which is a command to create a new directory? 🗂️
a) mkdir 🖥️
b) mkdir -p 🛠️
c) create dir 🚫
d) newdir 🚪
📂 Time for a tech challenge!
Comment your answer below
3 notes · View notes
hileynoteson · 1 year ago
Text
Crab Console
Tumblr media
hehehehe i did a thing
4 notes · View notes
blackmoreops · 10 days ago
Text
Automatically Save Terminal Outputs
Learning to automatically save terminal outputs becomes essential when debugging applications or documenting processes. The script command provides an elegant solution for recording all command line terminal activity, ensuring nothing gets lost during important sessions. Understanding why terminal output capture proves valuable helps developers and system administrators work more…
0 notes
krisfreedain · 9 months ago
Text
11 Vim Tips That Will Save You Hours of Editing Time
Nice list
0 notes
linuxtldr · 1 year ago
Text
1 note · View note
fred-the-dinosaur · 1 year ago
Text
ok rant over I'm going to put on my big boy pants and go find out what keeps doing wrong with my supposedly simple command to write a bootable flash drive (it's been 84 years.jpeg etc)
1 note · View note
merge-conflict · 1 year ago
Text
Shoehorning in an explanation of signal handling to the fic I’m not writing to explain why it’s extra punny if Goro calls for Alt’s attention and then apologizes for interrupting her.
1 note · View note
newcodesociety · 2 years ago
Text
0 notes
nixcraft · 1 year ago
Text
Tumblr media
See, that is why Redhat and Mr. Poettering have introduced all in one systemd command that does grep command and limiting output in a single go for a given service log. How cool is that? You guys hate systemd for no good reason 🤭
journalctl -u nginx.service -g failed -n 10
See also Linux Log Files Location And How Do I View Logs Files on Linux? for more info.
43 notes · View notes
2bits · 2 years ago
Text
Advanced macOS Command-Line Tools
macOS is fortunate to have access to the huge arsenal of standard Unix tools. There are also a good number of macOS-specific command-line utilities that provide unique macOS functionality. To view the full documentation for any of these commands, run man <command>.
0 notes
simple-logic · 8 months ago
Text
Tumblr media
#QuizTime Which command checks incoming log messages?
a) show log 📜 b) systemctl show log 🖥️ c) journalctl -f 📝 d) journalctl -xe 🔍
Let's test your Linux knowledge! Comment your view in the comments👇
0 notes
hileynoteson · 1 year ago
Text
you are involved with the scp foundation
i am involved with the scp command
we are not the same
1 note · View note
krjpalmer · 2 months ago
Text
Tumblr media
TRS-80 Microcomputer News February 1983
An updated version of the Model II small-business computer featured on the cover of this issue. The Model 16 the Model 12 could be upgraded into also had a multi-user, 68000-powered operating system at last, although I have seen comments over the years Radio Shack jettisoned not altogether unpromising work on a different operating system to bring in Microsoft's TRS-XENIX. (The article introducing it described all the different Unix commands and programs available, going all the way down to "WUMP.")
24 notes · View notes